﻿<UserControl x:Class="WpfImageDuplicates.ImageInfoView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:y="clr-namespace:WpfImageDuplicates"
             xmlns:wpf="clr-namespace:BrainTechLLC.WPF;assembly=BrainTechLLC.WPF"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d">    
    <StackPanel Orientation="Vertical" x:Name="stacker" Margin="2,2,2,2">
        <StackPanel Orientation="Horizontal">
            <ToggleButton Focusable="False" 
                          IsChecked="True" FontSize="8" x:Name="btnView1" Content="View 1" 
                          MouseEnter="btnView1_MouseEnter" MouseLeave="btnView1_MouseLeave" 
                          Checked="btnView1_Checked" Unchecked="btnView1_Unchecked"/>
            <ToggleButton Focusable="False" 
                          FontSize="8" x:Name="btnView2" Content="View 2" 
                          MouseEnter="btnView2_MouseEnter" MouseLeave="btnView2_MouseLeave" 
                          Checked="btnView2_Checked" Unchecked="btnView2_Unchecked"/>
        </StackPanel>
        <Grid x:Name="view1" Visibility="Collapsed">
            <StackPanel Orientation="Vertical">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="File Name:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding FileNameOnly}"/>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="File Size:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding Mode=OneWay, Path=FileSizeFormatted}"/>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Width x Height:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding WidthHeight}"/>
                </Grid>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Width x Height Now:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding CurrentWidthHeight}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=PixelFormatString, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Pixel Format:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding PixelFormatString}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=ImageDescription, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Image Description:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding ImageDescription}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=DateTime, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Date/Time:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding DateTime}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=DateTimeOriginal, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="DateTimeOriginal:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding DateTimeOriginal}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=DateTimeDigitized, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="DateTimeDigitized:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding DateTimeDigitized}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=Make, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Make:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding Make}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=Model, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Model:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding Model}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=Software, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Software:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding Software}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=Artist, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Artist:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding Artist}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=Aperture, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Aperture:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding Aperture}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=Brightness, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Brightness:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding Brightness}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=MeteringMode, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="MeteringMode:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding MeteringMode}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=SensingMethod, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="SensingMethod:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding SensingMethod}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=ShutterSpeed, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="ShutterSpeed:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding ShutterSpeed}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=LightSource, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="LightSource:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding LightSource}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=ISOSpeedRatings, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="ISOSpeedRatings:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding ISOSpeedRatings}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=ExposureProgram, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="ExposureProgram:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding ExposureProgram}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=ExposureTime, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="ExposureTime:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding ExposureTime}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=FNumber, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="FNumber:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding FNumber}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=Copyright, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Copyright:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding Copyright}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=UserComment, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="UserComment:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding UserComment}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=Blur, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Blur Rating:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding Path=Blur, StringFormat=N0}"/>
                </Grid>
                <Grid Visibility="{Binding Mode=OneWay, Path=Similarity, Converter={StaticResource VisibilityConverter}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="Similarity Measure:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding Path=Similarity, StringFormat=N0}"/>
                </Grid>
            </StackPanel>
        </Grid>
        <Grid x:Name="view2" Visibility="Collapsed">
            <StackPanel Orientation="Vertical" x:Name="stacker2">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="120"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <TextBlock Grid.Column="0" Text="File Name:"/>
                    <TextBlock FontWeight="Bold" Grid.Column="1" Text="{Binding FileNameOnly}"/>
                </Grid>
            </StackPanel>
        </Grid>
    </StackPanel>
</UserControl>
